package
{
    import flash.display.MovieClip;
    import flash.events.Event;

    [Embed(source="/../res/assets.swf", symbol="BellBoomMC")]
    public class BellBoom extends MovieClip
    {
        private var m_onAnimationEnd : Function; 
        
        public function BellBoom(onAnimationEnd : Function)
        {
            super();
            m_onAnimationEnd = onAnimationEnd;
            addEventListener(Event.ENTER_FRAME, onEnterFrame);
        }
        
        private function onEnterFrame(event : Event) : void
        {
            if(parent && (currentFrame >= totalFrames))
            {
                parent.removeChild(this);
                m_onAnimationEnd();
            }
        }
    }
}